package com.woniuxy.order.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.woniuxy.order.entity.OrderApprovalRecord;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 订单审批记录Mapper接口
 */
@Mapper
public interface OrderApprovalRecordMapper extends BaseMapper<OrderApprovalRecord> {
    
    /**
     * 根据订单ID查询审批记录
     */
    List<OrderApprovalRecord> selectByOrderId(Long orderId);
    
    /**
     * 根据审批人查询审批记录
     */
    List<OrderApprovalRecord> selectByApprover(String approverName);
    
    /**
     * 根据审批结果查询记录
     */
    List<OrderApprovalRecord> selectByApprovalResult(String approvalResult);
    
    /**
     * 统计审批记录数量
     */
    Long countByApprover(String approverName);
}
